<?php
/**
 * Created by PhpStorm.
 * User: Martin.Wu
 * Date: 2020/5/8
 * Time: 10:41
 *
 **/
namespace common\strategy\judge;

use common\strategy\StrategyAbstract;

class Business extends StrategyAbstract
{
    public function doAction($data)
    {
        //如果判断字符串是否在数组中的判断
        if (isset($data['inArray'])) {
            if (isset($data['string']) && isset($data['array'])) {
                if (!empty($data['array'])) {
                    return in_array($data['string'], $data['array']);
                }
            }
        }

        return false;
    }
}